import Vrouter from "../router/index"

const route = Vrouter.currentRoute.value
export default function storage(...params) {
  let lth = Array.from(params).length
  if (lth == 3) {
    sessionStorage.setItem('storageInfo', JSON.stringify(params[0]))
    return
  }
  if (lth == 1) {
    sessionStorage.removeItem('storageInfo')
  } else {
    let obj = sessionStorage.getItem('storageInfo')
    return obj
  }
}
